home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
vol_200
/
253_01
/
vc.doc
< prev
next >
Wrap
Text File
|
1990-02-13
|
13KB
|
306 lines
The Visual Calculator - Version 1.10
The visual calculator was written to be used for quick
calculations of the variety that would ordinarily be done
with a hand held calculator. There is no allowance for
programming loops, or indirect variables, or any of the
other facilities of a modern programming language. There
are no complications either, and this program should not
require more than a few minutes for the experienced com-
puter user to learn to use, and only slightly longer for
the person inexperienced with computers.
It is suggested that you slowly run through the tutor-
ial first, performing the operations suggested, then read
the following comments for a description of the visual
calculator. This program is intended to be much more comp-
rehensive than the little on-screen calculators that have
become popular, but it is not memory resident. Due to the
expected future popularity of such programs as "Windows",
this program can be as convenient as the present memory
resident programs.
The Visual Calculator Tutorial
1. Copy all files to another working diskette with your
operating system or to a single directory on your hard
disk.
2. Type VC <return>
You will get the beginning screen containing the vari-
able boxes and the help box at the top. The center of the
screen contains the transcript box, and at the bottom you
will find the Input box.
3. Type A = 123.45 <return>
You will find that the value is displayed in the top
box and the value will also be displayed at the left of
the input equation in the transcript box.
4. Type B = SQRT(A) <return>
You will find the square root of A displayed in both
places next to the variable B. You may have noticed that
the system doesn't care if you use upper or lower case,
it forces it to upper case. You now have defined some
values for the variables A and B.
5. Type D = 1.23*SIN(SQRT(1.2345 + B*B/A)) <return>
Spaces between variables don't matter and you can put
them in where you desire to make it look nice. If you get
an error message, simply use the left and right cursor
keys along with the delete key to fix up the error and
hit the return again. You don't even have to be at the
end of the line to hit the return.
6. Hit the F6 key then <return>
The F6 requests a file to be read in and if you don't
specify a filename, it reads in the file named "HELP".
This would be a good place to store a list of your other
files in the same manner as this file.
7. Hit the F6 key then type AMORT <return>
This reads in the file named "AMORT" and calculates
each line as it reads it in. Notice that it also changed
the names of the variables that it uses to make them more
meaningful to you.
8. Type PRINC = 30000 <return>
This changes the amount of the loan. We would like to
recalculate the payment which we will in the next few steps.
9. Move the arrow up to the line that starts "PMNT=..." by
using the up and down arrow keys. When the arrow is point-
ing at the line in question,...
10. Hit the F9 key.
This moves the line pointed at, by the little arrow,
into the input box where it can be modified or used again
as is.
11. Hit the <return> key.
This will recalculate the payment based on the new
principal and the old interest rates and time of repay-
ment. These could also be changed and the payment
recalculated.
12. Make sure your printer is ready and hit the F3 key.
This will cause a "Print on" message to be printed on
your printer and a little "Print" message to be displayed
in the upper right of your screen. All equations and the
results will be printed for a hardcopy of your calculating
session.
13. Hit the F6 key again
You will get another prompt for a file name.
14. Type PAYMENT <return>
This file will be read in that will give you the results
of your mortgage after the first payment. The results will
also be printed out.
15. Hit the F6 key again and <return>
The last file read in will be reused again and the result
of making the second payment will be displayed on the moni-
tor and the printer.
16. Repeat step 15 three or four times.
17. Hit the F1 key.
A help screen will appear describing the various math
functions available. They can be nested to whatever level
you desire.
18. Hit the F2 key.
A help screen will appear with a very brief description
of the system functions available.
19. Hit the "Home" key.
You will be immediately transported to the very top of
the transcript where the welcome message was originally
seen. The Pgup, Pgdn, Home, and End keys will get you
through the transcript window very quickly.
20. Move the little arrow to the line that starts "# A-PRINC",
and hit the F4 key once.
You will see that the asterisk appears in front of the
line. This will "mark" the line. Continuing to hit the F4
key will toggle the asterisk on and off.
21. Move the arrow to the line that starts "# E-EQUITY" and mark
this line too.
22. Hit the F5 key
The system is now prompting you for a file name to
output to.
23. Type STUFF <return>
This is simply a filename. Any valid filename could be
used. All lines in the transcript box that are "marked"
will be output to the file "STUFF".
24. Hit the F6 key and type STUFF <return>
All of the lines that were just output will be read in
and all calculations will be done.
25. Hit the F3 key if the printer is still on.
26. Hit the F6 key and <return>
The file will be read in again without printing.
27. Hit the F10 key and answer the prompt with Y to end the
session.
28. Type VC <return> again to restart the program.
29. Hit the F6 key, type TEST <return>
A file with 50 lines will be read in and all calcu-
lations performed as an example of the kinds of equations
that can be evaluated.
30. Type the following; # I-D J-O K-H L-X <return>
This tells the system that we want the variable "I" to
print out in Decimal notation, the variable "J" to print
out in Octal notation, and "K" and "L" to print out in
HeXadecimal notation. (Note - the # must be in the first
column.)
31. Type I = 12345 <return>
The variable I will be displayed in all three notations
in the top box and in decimal notation in the transcript
box.
32. Type J = 12345 <return>
The variable J will be displayed in Octal notation in
the transcript box and on the printer if it is turned
on and ready.
33. Type K = 12345 <return>
The variable K will be displayed in Hex notation in the
transcript box.
34. Type I = 012345 <return>
The value of I is read in as an octal value due to the
leading zero, but is still displayed as a decimal value.
35. Type J = 0X12345 <return>
The value of J is read in as a hexadecimal value due to
the leading 0X.
36. Type M = 0XFFFF <return>
The variable M is read in as Hexadecimal and displayed
in all three formats in the top box, but as decimal in the
transcript box. The default display for the integers is
decimal.
37. Type I = SQRT(48